/*csd*/define(function(require,exports,module){"use strict";var c=require("./utils");var a=exports;var b=(typeof JSON!=="undefined");a.stringify=b?JSON.stringify:function(f){switch(typeof(f)){case"string":return'"'+f.replace(/(["\\])/g,"\\$1")+'"';case"array":return"["+f.map(obj2str).join(",")+"]";case"object":if(c.isArray(f)){var h=[];var e=f.length;for(var d=0;d<e;d++){h.push(obj2str(f[d]));}return"["+h.join(",")+"]";}else{if(f==null||f==undefined){return"null";}else{var j=[];for(var g in f){j.push(obj2str(g)+":"+obj2str(f[g]));}return"{"+j.join(",")+"}";}}case"number":return f;case"boolean":return f;case false:return f;}};a.parse=b?JSON.parse:function(d){if(d==null){return null;}return(new Function("return "+d+";"))();};return a;});